<?php
# Template LD_gamerz for Nuked-Klan CMS version 1.7.9
# block_login.php

defined('INDEX_CHECK') or die ('<div style="text-align: center;">Action non-autorisée !</div>');

if (!$user)
{
?>
					<img class="avatar" src="themes/newproject/images/avatar.png" alt="" />
					<form class="login" action="index.php?file=User&amp;nuked_nude=index&amp;op=login" method="post">
						<p><input  class="name" id="pseudo" style="width:180px;" name="pseudo" type="text" maxlength="250" value="Pseudo"  onblur="if(this.value=='') this.value='Pseudo';" onfocus="if(this.value=='Pseudo') this.value='';"/></p>
						<p><input class="pass" id="pass" style="width:180px;" name="pass" type="password" maxlength="15" value="******" onblur="if(this.value=='') this.value='******';" onfocus="if(this.value=='******') this.value='';" />
						<input class="submit radius" type="submit" value="Submit" /></p>
					</form>
					<div class="clear"></div>
					<span><a href="#">Create a new account</a> or <a href="#">password lost?</a></span>
<?php
}
else
{
    if($user >= 3)
    {
        $admin = '<a href="index.php?file=Admin" title="Panneau d\'administration"><span class="admin_link">Admin</span></a>';
    }
	if ($avatar != "off")
	{
		$select_avatar="SELECT avatar FROM " . USER_TABLE . " WHERE id = '" . $user[0] . "'";
		$sql_avatar=mysql_query($select_avatar);
		list($avatar_url) = mysql_fetch_array($sql_avatar);
		if($avatar_url) $blok['content'] .= "<img src=\"" . $avatar_url . "\" style=\"border:1px " . $bgcolor3 . " dashed; width:100px; background:" . $bgcolor1 . "; padding:2px;\" alt=\"" . $user[2] . " \" /><br /><br />";
	}
	if ($c > 0) $blok['content'] .= "<hr style=\"height: 1px;\" />\n";
	{

        $sql2 = mysql_query("SELECT mid FROM " . USERBOX_TABLE . " WHERE user_for = '" . $user[0] . "' AND status = 1");
        $nb_mess_lu = mysql_num_rows($sql2);
	}
?>								
					<img class="avataron" src="<?php echo $avatar_url; ?>" alt="" />
					<div class="login">
						<div class="loginon">
							Bienvenue, <strong><?php echo $user[2]; ?></strong><br />
							<a href="index.php?file=Userbox"><b><?php echo $user[5]; ?> nouveaux messages</b></a><br />
							<a href="index.php?file=User"><?php echo _ACCOUNT; ?></a> / <a href="index.php?file=User&amp;nuked_nude=index&amp;op=logout"><?php echo _LOGOUT; ?></a><br />
							<br /><span style="position:relative; right:-10px;"><?php echo $admin; ?></span></p>
						</div>
					</div>
					<div class="clear"></div>
<?php
}